#from pydelicious import get_popular, get_userposts, get_urlposts
from deliciousrec import *
#def initializeUserDict(tag, count=5):
#    user_dict={}
#    for p1 in get_popular(tag=tag)[0:count]:
#        for p2 in get_urlposts(p1['href']):
#            user=p2['user']
#            user_dict[user]={}
#    return user_dict

usd = initializeUserDict('python')
usd ['shurchan']={}
fill = fillItems(usd)
import random
usr = usd.keys()[random.randint(0,len(usd)-1)]
usr = 'shurchan'
from recommendations import *
print topMatches(usd,usr)
print getRecommendations(usd,usr)[0:5]
url = getRecommendations(usd,usr)[0][1]
print url
print topMatches(transformPrefs(usd),url)


